
<script>
    export default {
        name: '',
        data() {
            return {
                value:'test'
            }
        },
        mounted () {
            console.log('挂载');
        },
        render(h){
            console.log(this.$route.name,'zhixing',this.value);
            let data = require(`@/view/render/page/template/${this.$route.name}.js`).default
            console.log(data,'data');
            const format = (arr)=>{
                return arr.map(item=>{
                    // let continue = Array.isArray(item.children)?item.children:
                    return h(
                        item.label,
                        {
                            props:{...item.props},
                            style:{...item.style},
                            on:{...item.on},
                            slot:item.slot
                        },
                        Array.isArray(item.children)?format(item.children):item.children
                    )
                })
            }
            return h(
               data.label,
               {
                props:{...data.props},
                style:{...data.style},
                on:{...data.on},
                slot:data.slot
               },
               Array.isArray(data.children)?format(data.children):data.children
            )
        }
    }
</script>

<style lang="" scoped>
    
</style>